package zcj.stu.C43;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@ComponentScan("zcj.stu.C43")
public class C43 {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(C43.class);
        Object bean1 = context.getBean("&bean1");//拿到工厂对象
        System.out.println(bean1);
        Object bean11 = context.getBean("bean1");
        System.out.println(bean11);
        Object bean111 = context.getBean("bean1");
        System.out.println(bean111);
    }
}
